﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CivitaiCLI.Utils
{
    public static class ConsoleUtil
    {
        public static void Write(string text, ConsoleColor color)
        {
            ConsoleColor oldColor = Console.ForegroundColor;

            if (color != oldColor)
                Console.ForegroundColor = color;

            Console.Write(text);

            if (color != oldColor)
                Console.ForegroundColor = oldColor;
        }
        public static void WriteLine(string text, ConsoleColor color)
        {
            ConsoleColor oldColor = Console.ForegroundColor;

            if (color != oldColor)
                Console.ForegroundColor = color;

            Console.WriteLine(text);

            if (color != oldColor)
                Console.ForegroundColor = oldColor;
        }
    }
}
